/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.caresms.service.persistence;

import com.caresms.model.Category_Master;

import com.liferay.portal.service.persistence.BasePersistence;

/**
 * The persistence interface for the category_ master service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author cc
 * @see Category_MasterPersistenceImpl
 * @see Category_MasterUtil
 * @generated
 */
public interface Category_MasterPersistence extends BasePersistence<Category_Master> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link Category_MasterUtil} to access the category_ master persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the category_ master in the entity cache if it is enabled.
	*
	* @param category_Master the category_ master
	*/
	public void cacheResult(com.caresms.model.Category_Master category_Master);

	/**
	* Caches the category_ masters in the entity cache if it is enabled.
	*
	* @param category_Masters the category_ masters
	*/
	public void cacheResult(
		java.util.List<com.caresms.model.Category_Master> category_Masters);

	/**
	* Creates a new category_ master with the primary key. Does not add the category_ master to the database.
	*
	* @param CatId the primary key for the new category_ master
	* @return the new category_ master
	*/
	public com.caresms.model.Category_Master create(long CatId);

	/**
	* Removes the category_ master with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param CatId the primary key of the category_ master
	* @return the category_ master that was removed
	* @throws com.caresms.NoSuchCategory_MasterException if a category_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Category_Master remove(long CatId)
		throws com.caresms.NoSuchCategory_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	public com.caresms.model.Category_Master updateImpl(
		com.caresms.model.Category_Master category_Master, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the category_ master with the primary key or throws a {@link com.caresms.NoSuchCategory_MasterException} if it could not be found.
	*
	* @param CatId the primary key of the category_ master
	* @return the category_ master
	* @throws com.caresms.NoSuchCategory_MasterException if a category_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Category_Master findByPrimaryKey(long CatId)
		throws com.caresms.NoSuchCategory_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the category_ master with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param CatId the primary key of the category_ master
	* @return the category_ master, or <code>null</code> if a category_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Category_Master fetchByPrimaryKey(long CatId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the category_ master where CatName = &#63; or throws a {@link com.caresms.NoSuchCategory_MasterException} if it could not be found.
	*
	* @param CatName the cat name
	* @return the matching category_ master
	* @throws com.caresms.NoSuchCategory_MasterException if a matching category_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Category_Master findByFindByCatName(
		java.lang.String CatName)
		throws com.caresms.NoSuchCategory_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the category_ master where CatName = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param CatName the cat name
	* @return the matching category_ master, or <code>null</code> if a matching category_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Category_Master fetchByFindByCatName(
		java.lang.String CatName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the category_ master where CatName = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param CatName the cat name
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching category_ master, or <code>null</code> if a matching category_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Category_Master fetchByFindByCatName(
		java.lang.String CatName, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the category_ masters.
	*
	* @return the category_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Category_Master> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the category_ masters.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of category_ masters
	* @param end the upper bound of the range of category_ masters (not inclusive)
	* @return the range of category_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Category_Master> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the category_ masters.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of category_ masters
	* @param end the upper bound of the range of category_ masters (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of category_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Category_Master> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes the category_ master where CatName = &#63; from the database.
	*
	* @param CatName the cat name
	* @return the category_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Category_Master removeByFindByCatName(
		java.lang.String CatName)
		throws com.caresms.NoSuchCategory_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the category_ masters from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of category_ masters where CatName = &#63;.
	*
	* @param CatName the cat name
	* @return the number of matching category_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countByFindByCatName(java.lang.String CatName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of category_ masters.
	*
	* @return the number of category_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;
}